<%@ page contentType="text/html;charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<html:html>
<head>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<LINK href="../styles/stylewang.css"  type=text/css rel=stylesheet>
		<LINK href="xtree.css"  type=text/css rel=stylesheet>
		<style type="text/css"> 
			.divcontent   {   overflow-y:   scroll;   height:   200px;   width:  100%;}
		</style>
		<script language=javascript>
			function showTaskInfo(path,filename){
				top.B.Child.document.getElementById("fileframe").setAttribute("src","path/"+path+"?sort=dd&fileName="+filename);
			}
		
		</script>
		<title>CGProject</title>
		<html:base/>
</head>
<%
String cpath = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+cpath+"/";
%>
<%String id = (String)request.getAttribute("ID");%>
<%String type = (String)request.getAttribute("Type");%>
<%String top = (String)request.getAttribute("topRank");%>
<%String path=(String)request.getAttribute("path");%>
<%String filename=(String)request.getAttribute("filename");%>
<script language=javascript>
	function init1(){
		showTaskInfo('<%=path%>','<%=filename %>');
//		var newwin=window.open('<%=basePath %>/confirm/taskInfo.do?taskId=<%=id%>','newwin',null,null);
//		newwin.focus();
	}
</script>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" onLoad="init1();">
 <table border="0" width="461" cellspacing="0" id="table6">  
	<tr>
		<td colspan="4" id="onlybt">&nbsp;
		<b><font color="#990000">
		<bean:write name="Type"/>&nbsp;&nbsp;<bean:write name="Name"/></font><bean:message key="confirmhistory"/><b>&nbsp;</b>
	  </td>
	</tr>
	<logic:empty name="Tag">
	<tr>
		<td colspan="4" id="rightcenter">&nbsp;
		<b>
		<bean:message key="nohistory"/><b>&nbsp;</b>
		</td>
	</tr>
	</logic:empty>
	 
	<logic:iterate id="element" name="CHS">
	<tr >
		<td width="48" id="leftcenter">
		&nbsp;&nbsp;&nbsp;
		<bean:write name="element" property="reguser.regName"/></td>
		<td width="127" id="leftcenter">
		&nbsp;&nbsp;&nbsp;
		<bean:write name="element" property="confirmInformation"/></td>
		<td width="66" id="leftcenter">&nbsp;
		<logic:equal name="element" property="isPass" value="0">&nbsp;<bean:message key="confirm.notpass"/></logic:equal>
		<logic:equal name="element" property="isPass" value="1">&nbsp;<bean:message key="confirm.pass"/></logic:equal></td>
		<td  width="120" id="rightcenter">
		&nbsp;
		<bean:write name="element" property="confirmTime" format="yyyy-MM-dd HH:mm"/></td>
	</tr>	
	</logic:iterate>
	</table>
	
	<table border="0" width="461" cellspacing="0" id="table6" >
	<tr>
		<td colspan="4" width="61%" id="onlybt">&nbsp;
		&nbsp;<b><font color="#990000"><bean:message key="confirm.rankillustrate"/></font></b><b>&nbsp;&nbsp;
		<font color="#990000"><bean:message key="currentcategory"/>: <bean:write name="Category"/></font></b></td>
	</tr>

	<logic:iterate id="element" name="Confirms">
	<tr>
		<logic:equal name="element" property="rank" value="1">
		<td width="15%" id="leftcenter" rowspan="<bean:write name="topRank"/>">
		<img border="0" src="../image/top.JPG" width="50" height="100"></td>
		</logic:equal>
		<td colspan="3" width="84%" id="rightcenter">
		<bean:write name="element" property="reguser.regName"/></td>
	</tr>	
	</logic:iterate>
	</table>
	<table border="0" width="461" cellspacing="0" id="table6">
	<tr>
		<td  id="onlybt">&nbsp;
		&nbsp;&nbsp;<b><font color="#990000"><bean:message key="confirm"/></font></b>
		</td>
	</tr>
	
		<html:form action="/confirm" enctype="multipart/form-data">
			<html:hidden property="type" value="<%=type%>"/>
			<html:hidden property="id" value="<%=id%>"/>
		<tr>
			<td  id="rightcenter">
				<html:textarea rows="5" property="information" value="" />
				
				<html:file property="changeFile" />
			</td>
		</tr>
		<tr>
		<td width="100%" id="rightbottom"><bean:message key="confirm.usable"/><html:checkbox  property="isUsable"/>&nbsp;
			&nbsp;&nbsp;<b><bean:message key="confirm.selectstatus"/></b>
			<html:select property="status" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px" >
			<html:option value="1"><bean:message key="confirm.pass"/></html:option>
			<html:option value="0"><bean:message key="confirm.notpass"/></html:option>
			</html:select>
			&nbsp;&nbsp;
			<logic:equal name="TOP" value="1">
			Skip the higherLevels ? 
			<html:select property="upLevel" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px" >
				<html:option value="0">No</html:option>
				<html:option value="1">Yes</html:option>
				
			</html:select>
			</logic:equal>
			<logic:equal name="TOP" value="0">
			<html:hidden property="upLevel" value="1"/>
			</logic:equal>
			<!-- 
			<html:submit onclick="submitConfirm();">submit</html:submit>
			-->
			<input type="button" onClick="submitConfirm();" value="submit">
			</td>
		</tr>
		
		</html:form>
</table>


</body>
</html:html>
<script language="javascript">
function submitConfirm()
{
	if(window.document.confirmForm.upLevel.value=="1")
	{
		if(confirm("Directly Confirm ?")){
			var a=document.getElementsByTagName("form");
			a[0].submit();
			
		};
	}
	else
	{
		if(confirm("Confirm")){
			var a=document.getElementsByTagName("form");
			a[0].submit();
		};
	}
}
</script>
